ASP 中<select>字体问题 和 弹出标签传递变量问题

来源:百度知道 编辑:UC知道 时间:2024/06/16 00:14:01
2个问题求教大家,这里先道谢了!
1.1级目录和2级目录的显示
<td><select name="c_id" class="input">
<%
sql="select cat_id,cat_name from a_cat where sid=0"
set rs1=conn.execute(sql)
do while not rs1.eof
response.write "<optgroup label='"&rs1("cat_name")&"'>"
sql="select cat_id,cat_name from a_cat where sid="&rs1("cat_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,1
do while not rs2.eof
%>
<option
<% l_bj=strcomp(rs2("cat_id"),csid,1)

if l_bj=0 then %>
selected
<% end if%>

value="<%=rs2("cat_id")%>">├ <%=rs2("cat_id")%><%=rs2("cat_name")%>

</option>
<%
rs2.movenext
loop
rs1.movenext
loop
rs1.close

1、把 class="input" 这句去掉 就是普通的字体了。
2、用变量(变量名CSID)替代上面的PPP常量方法:
response.write"this.top.location.href='input.asp?action=" & csid & "';</SCRIPT>"